import 'package:flutter/material.dart';
// 布局联系练习demo
void main() => runApp(MaterialApp(
  home: Home(),
));


// 封装自定义无状态Widget Home(保存后会自动热重载)
class Home extends StatelessWidget {
  // 重写无状态Widget build
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      backgroundColor: Colors.grey[900],
      appBar: AppBar(
        title: Text(
            "Demo在线",
            style: TextStyle(
              color: Colors.white,
            )
        ),
        backgroundColor: Colors.grey[800],
        centerTitle: true,
      ),
      body: Padding(
        padding: const EdgeInsets.all(30.0),
        child: Column(
          crossAxisAlignment: CrossAxisAlignment.start,
          children: [
            Center(
              child: CircleAvatar(
                radius: 50.0,
                backgroundImage: AssetImage('assets/images/2.png'),
              ),
            ),
            Divider(
              height: 50.0,
              color: Colors.grey[600],
            ),
            Text(
              "姓名",
              style: TextStyle(
                color: Colors.grey[600],
                fontSize: 20.0,
              ),
            ),
            SizedBox(height: 10),
            Text(
              "张三",
              style: TextStyle(
                color: Colors.amber,
                fontWeight: FontWeight.bold,
                fontSize: 25.0,
              ),
            ),
            SizedBox(height: 30),
            Text(
              "公司",
              style: TextStyle(
                color: Colors.grey[600],
                fontSize: 20.0,
              ),
            ),
            SizedBox(height: 10),
            Text(
              "阿里巴巴",
              style: TextStyle(
                color: Colors.amber,
                fontWeight: FontWeight.bold,
                fontSize: 25.0,
              ),
            ),
            SizedBox(height: 30),
            Text(
              "岗位",
              style: TextStyle(
                color: Colors.grey[600],
                fontSize: 20.0,
              ),
            ),
            SizedBox(height: 10),
            Text(
              "前端开发工程师",
              style: TextStyle(
                color: Colors.amber,
                fontWeight: FontWeight.bold,
                fontSize: 25.0,
              ),
            ),
            SizedBox(height: 20),
            Row(
              children: [
                Icon(
                  Icons.email,
                  color: Colors.grey[600],
                ),
                SizedBox(width: 10),
                Text(
                  "2293188960@qq.com",
                  style: TextStyle(
                    color: Colors.grey[600],
                    fontSize: 20.0,
                  ),
                ),
              ],
            )
          ],
        )
      ),
    );
  }
}